package com.hmkj.admin.controller.wx;

import com.hmkj.admin.controller.BaseController;
import com.hmkj.common.baseMapper.GenericPo;
import com.hmkj.core.po.wx.WxClickReply;
import com.hmkj.core.service.wx.WxClickReplyService;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import javax.annotation.Resource;
import java.util.List;

/**
 * 平台后台微信公众号管理
 * Created by SteveLi on 2016/7/8.
 */
@Controller
@RequestMapping(BaseController.BASE_URI)
public class WxClickReplyController extends BaseController {

    @Resource
    WxClickReplyService wxClickReplyService;

    /**
     * 点击事件回复列表
     * @param model
     * @return
     */
    @RequestMapping(value = "clickreply/list", method = RequestMethod.GET)
    public String clickReplyList(ModelMap model) {
        List<WxClickReply> clickReplyList = wxClickReplyService.select(new WxClickReply(t->t.setDelFlag(GenericPo.DELFLAG.NORMAL.code)));
        model.put("clickReplyList", clickReplyList);
        return getAdminTemplate("wx/clickreplylist");
    }
}
